POV-Ray : Newsgroups : povray.newusers : Bulge : Re: Bulge Server Time
5 Sep 2024 10:25:40 EDT (-0400)
  Re: Bulge  
From: Joshua English
Date: 3 Apr 2001 02:01:18
Message: <3AC9670C.2D6A82B6@spiritone.com>
Nekar Xenos wrote:

> What would be the best way to make the bulge on a violin?
>
> Nekar

Boy, if you're using a modeller that uses patches it should be easy, but
in POV-Ray on it's own that can be difficult. I would start by declaring
the shape for the violin :

// Violin shape, very primitive
#declare Violinshape =
difference {
  union {
    cylinder { <0,0,1> <0,1,1> 1 }
    cylinder { <0,0,-1> <0,1,-1> 1 }
    }
  cylinder { <0,-0.1,0> <0,1.1,0> 1 scale <0.25,1,0.5> translate -1*x }
  cylinder { <0,-0.1,0> <0,1.1,0> 1 scale <0.25,1,0.5> translate  1*x }
 }

This should give you the basic profile, then use something like the
following:
intersection {
  object { Violinshape }
  cylinder { <0,-n,-2> <0,-n,2> n+1 }
  texture { ... }
  }

You can experiment with larger values on n (Keep n positive but keep the
negative signs). The top of the bulge will touch the plane y=1 no matter
what value you use for n.

This is untested, but this is how I would start it. You might use a
prism shape to declare the violin shape to make it more accurate.

Josh English
eng### [at] spiritonecom


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.